package w83b.w83bOperacionesPaso.w83bHistoricos;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import w83b.w83bBeans.W83bHistoricosBean;

import es.ejie.frmk.presentacion.operacion.paso.Q70ActionPasoOP;
import es.ejie.frmk.presentacion.sesiondatos.Q70ContextoEJIE;



// TODO: Auto-generated Javadoc
/**
 * The Class W83bTablaAgrupacionesOP.java.
 *
 * @author Deusto Sistemas
 */
public class W83bBuscarHistoricosOPAction extends Q70ActionPasoOP{

	
	
	protected void processOP(Q70ContextoEJIE contexto, ActionErrors errores, ActionMapping mapping,
			ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		//Guardamos la accion en el contexto
		
		W83bHistoricosBean datosBean = new W83bHistoricosBean();
		datosBean.setAnyo(request.getParameter("anyo"));
		datosBean.setMes(request.getParameter("mes"));
		datosBean.setTerritorio(request.getParameter("territorio"));
		datosBean.setPorcentaje(request.getParameter("porcentaje"));
		datosBean.setNumTrabajadores(request.getParameter("numTrabajadores"));
		datosBean.setDescTerritorio((String)request.getParameter("descTerritorio"));
		datosBean.setPorComarca((String)request.getParameter("comarca"));
		datosBean.setConvenio((String)request.getParameter("convenio"));
		datosBean.setSector((String)request.getParameter("sector"));
		datosBean.setAgrupacion((String)request.getParameter("agrupacion"));		
		
		contexto.set("w83bHistoricosBean",datosBean);
		
		contexto.set("migas","inicio.informes.historicos");
		
		
	}

	protected ActionForward processForward(Q70ContextoEJIE contexto, ActionErrors errors, ActionMapping mapping, 
			ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
	
		return mapping.findForward("ok");
	}
	

}
